package com.lb.jwitter.service;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.lb.jwitter.*;
import com.lb.jwitter.hibernate.*;
import com.lb.jwitter.util.ConditionReport;

@Service("tbl_Config_Template6Service")
@Transactional
@WebService(endpointInterface = "com.lb.jwitter.service.Tbl_Config_Template6Service")
public class Tbl_Config_Template6ServiceImpl implements Tbl_Config_Template6Service,Serializable {

   private Log log = LogFactory.getLog(Tbl_Config_Template6ServiceImpl.class);
   private static final long serialVersionUID = -8740095022264495229L;

   @Autowired
   @Qualifier("tbl_Config_Template6DAO")
   private Tbl_Config_Template6DAO _tbl_Config_Template6Dao;

   public final List<Tbl_Config_Template6> findAlltbl_Config_Template6(int pageSize, int page){
   List<Tbl_Config_Template6> result = get_tbl_Config_Template6Dao().findAll(pageSize, page);
       log.info("Number of user in DB:: "+result.size());
       return result;
   }

   @Transactional(noRollbackFor=IllegalArgumentException.class)
   public final Long createtbl_Config_Template6(Tbl_Config_Template6 obj){
       return _tbl_Config_Template6Dao.save(obj);
   }

   public final void updatetbl_Config_Template6(Tbl_Config_Template6 obj){
       _tbl_Config_Template6Dao.update(obj);
   }//end update methode

   public final Tbl_Config_Template6 gettbl_Config_Template6 (Long id){
       log.info("Try to retrieve the tbl_Config_Template6: "+id);
       return get_tbl_Config_Template6Dao().get(id);
   }

   public void deletetbl_Config_Template6(Long id){
       log.info("Try to delete the tbl_Config_Template6 by Id : "+ id);
       if(_tbl_Config_Template6Dao.exists(id)){
	    _tbl_Config_Template6Dao.delete(id);
       } else {
       	throw new IllegalArgumentException("EmployeeId '"+id+"' does not exists");
       }
   }

   public void deleteListtbl_Config_Template6(String[] listId){
       for(String id : listId){
   	    deletetbl_Config_Template6(Long.parseLong(id));
       }
   }

   public List<Tbl_Config_Template6> findtbl_Config_Template6ByCondition(List<ConditionReport> cons,int pageSize,int page){ 
       return _tbl_Config_Template6Dao.findByCondition(Tbl_Config_Template6.class, cons, pageSize, page); 
   } 
 
   public int counttbl_Config_Template6ByCondition(List<ConditionReport> cons){ 
       return _tbl_Config_Template6Dao.countByCondition(Tbl_Config_Template6.class, cons); 
   } 
 
   public final Tbl_Config_Template6DAO get_tbl_Config_Template6Dao() {
   	return _tbl_Config_Template6Dao;
   }
   public final void set_tbl_Config_Template6Dao(Tbl_Config_Template6DAO obj) {
   	this._tbl_Config_Template6Dao = obj;
   }

}//endclass

